<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>代办事项</title>
    <%
    layout("/page/tags/header.html",{}){}
    %>
    <script type="text/javascript" src="${work_flow_basePath}js/ecommon.js"></script>
    <style>
        .panel window {
            width: 90%;
            height: 90%;
        }
    </style>
</head>
<body>

<table id="listGrid" class="easyui-datagrid" title="代办事项"
       style="height: 90%;" url="${work_flow_basePath}ms/myWorks/getNeedComplateTask"
       pagination="true" rownumbers="true" fitColumns="true"
       singleSelect="true" pageSize="10" striped="true" toolbar="#toolbar">
    <thead>
    <tr>
        <th align="center" field="title" width="35%" sortable="false">流程标题</th>
        <th align="center" field="taskName" width="19%" sortable="false">任务名称</th>
        <th align="center" field="createUser" width="15%" sortable="false">申请人</th>
        <th align="center" field="instanceCreateTime" width="15%" sortable="false">申请时间</th>
        <th align="center" field="taskCreateTime" width="15%" sortable="false">任务创建时间</th>
    </tr>
    </thead>
</table>
<div id="toolbar">
    <div style="margin-bottom: 5px">
        <input id="titleF" name="titleF" type="text" placeholder="流程标题">
        <input id="taskNameF" name="taskNameF" type="text" placeholder="任务名称">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" plain="true"
           onclick="reload()">查询</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-search" plain="true"
           onclick="addSelectRowFun('listGrid',handle)">办理</a>
    </div>
</div>

<div id="addOrUpdateDialog" class="easyui-dialog" title="处理任务"
     data-options="iconCls:'icon-save'" closed="true"
     style="width: 90%; height: 90%; padding: 0px"
     buttons="#dlg-buttons">
</div>


<script type="text/javascript">
    //重新加载
    function reload() {
        $('#listGrid').datagrid('load', {
            title: $('#titleF').val(),
            taskName: $('#taskNameF').val(),
        });
    }

    function handle(row) {
        openDialog('${work_flow_basePath}b/page-ms/handle?taskId=' + row.taskId + "&processInstanceId=" + row.activitiInstanceId, '处理任务 {' + row.title + "}");
    }

</script>
</body>
</html>
